package com.cooper.scraper;

import java.util.List;

import com.cooper.android.comm.Resource;

public class BrowseResourceCollector<T extends Resource> extends
		ResourceCollector<T> {

	public BrowseResourceCollector(String scraperId) {
		super(scraperId);
		resetPageCount();
	}

	public BrowseResourceCollector(String scraperId, List<String> removeIds) {
		super(scraperId, removeIds);
		resetPageCount();
	}

	@Override
	public int getCurrPageNumber() {
		return pageNumber;
	}

	@Override
	protected void resetPageCount() {
		pageNumber = 1;
		pageCount = -1;
	}

	@Override
	public boolean EOF() {
		return (pageCount < pageNumber);
	}

	@Override
	public boolean hasNextPage() {
		return (pageCount > pageNumber);
	}

	@Override
	public void nextPage() {
		pageNumber++;
	}

}
